<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>用户列表</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<table class="table table-bordered">
    <caption>测试用户信息</caption>
    <thead>
    <tr>
        <th>ID</th>     <th>性别</th>
        <th>年龄</th>
        <th>电话</th>
        <th colspan="3">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="user:${list}">
        <td th:text="${user.id}">0</td>
        <td th:text="${user.name}">name</td>
        <td th:text="${user.man?'男':'女'}">man</td>
        <td th:text="${user.age}">age</td>
        <td th:text="${user.phone}">phone</td>
        <td align="center">
            <a th:href="@{/toAdd}">添加</a>
            <a th:href="@{'/toEdit/' + ${user.id}}">编辑</a>
            <a th:href="'/delete?id='+${user.id}">删除</a>
        </td>
    </tr>
    </tbody>
</table>
</div>
</body>
</html>